package com.edwarder.service.impl;

import com.alibaba.fastjson.JSON;
import com.edwarder.dao.CityDao;
import com.edwarder.entity.City;
import com.edwarder.service.CityService;
import utils.MybatisUtils;

import java.util.List;

/**
 * @Auther: jzhang
 * @Date: 2018/9/21 15:01
 * @Description:
 */
public class CityServiceImpl implements CityService {
    private CityDao cityDao = MybatisUtils.getSqlSession().getMapper(CityDao.class);

    @Override
    public String getCityJSONString(String provinceId) {
        List<City> list = cityDao.findListByProvinceId(Integer.valueOf(provinceId));
        return JSON.toJSONString(list);

    }

}
